<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>申请提现</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#openingBank").focus();
			$("#inputForm").validate({
				rules: {
				},
				messages: {
					newBankCardNo: {equalTo: "输入与上面相同的卡号"}
				},
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
	<script>
		function isNumber(){
			var a=$("#bankCardNo").val();
			if(!isNaN(Number(a))){
				$("#card1").html("*");
			}else{
				$("#card1").html("请输入数字！");
			}
		}
		/*$("#bankCardNo").bind("propertychange",function() {
			if(""!=this.value){
				var str = this.value.replace(/(^\s*)|(\s*$)/g, "");
				if(this.value != str )
					this.value = str;
			}
			if( isNaN(Number(this.value)))
				this.value = this.value.replace(/[\D]/,'');
			alert(this.value);
		});*/
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/sys/user/toWithDrawApply">申请提现</a></li>
	</ul><br/>
	<form:form id="inputForm" modelAttribute="tbWithdrawApply" action="${ctx}/sys/user/acceptWithDrawApply" method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<sys:message content="${message}"/>
		<div class="control-group">
			<label class="control-label">当前钱包余额:</label>
			<div class="controls">
				<input  type="text" maxlength="50" minlength="3" value="${tbMpWallet.totalMoney}" disabled/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">开户行:</label>
			<div class="controls">
				<input id="openingBank" name="openingBank" type="text" value="" maxlength="50" minlength="3" class="required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">银行名称:</label>
			<div class="controls">
				<input id="bankName" name="bankName" type="text" value="" maxlength="50" minlength="3" class="required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">银行卡号:</label>
			<div class="controls">
				<input id="bankCardNo" name="bankCardNo" type="text"  maxlength="50" minlength="3" class="required" onblur="isNumber()"/>
				<span class="help-inline"><font color="red" id="card1">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">确认银行卡号:</label>
			<div class="controls">
				<input id="newBankCardNo" name="newBankCardNo" type="text"  maxlength="50" minlength="3" class="required" equalTo="#bankCardNo"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">户名:</label>
			<div class="controls">
				<input id="trueName" name="trueName" type="text" maxlength="50" minlength="2" class="required"/>
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="control-group">
			<label class="control-label">提取金额:</label>
			<div class="controls">
				<input id="money" name="money" type="number" min="0"  maxlength="10"  class="required" />
				<span class="help-inline"><font color="red">*</font> </span>
			</div>
		</div>
		<div class="form-actions">
			<input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>
		</div>
	</form:form>
</body>
</html>